package com.esoon.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * SOFTPHONE_CALL
 * @author 
 */
@Data
public class SoftphoneCall implements Serializable {
    /**
     * PK
     */
    private Integer clId;

    /**
     * 会话ID
     */
    private String clConnid;

    /**
     * 关联通话记录: SOFTPHONE_CALL.CL_ID
     */
    private Integer clParent;

    /**
     * 录音ID
     */
    private String clCallUuid;

    /**
     * 主叫
     */
    private String clAni;

    /**
     * 被叫
     */
    private String clDni;

    /**
     * 渠道
     */
    private String clChannel;

    /**
     * 通话类型
     */
    private String clType;

    /**
     * 分机工位
     */
    private String clAgentDn;

    /**
     * 是否接通
     */
    private String clAnswered;

    /**
     * 挂断类型
     */
    private String clHangup;

    /**
     * 开始振铃
     */
    private Date clRingTime;

    /**
     * 结束振铃
     */
    private Date clRingTimeEnd;

    /**
     * 开始拨号
     */
    private Date clDialTime;

    /**
     * 结束拨号
     */
    private Date clDialTimeEnd;

    /**
     * 接通时间
     */
    private Date clAnswerTime;

    /**
     * 挂断时间
     */
    private Date clIdleTime;

    /**
     * 通话时长
     */
    private Integer clTalkTime;

    /**
     * 等待时长
     */
    private Integer clWaitTime;

    /**
     * 随路数据
     */
    private String clUserData;

    private Integer createId;

    /**
     * 创建人
     */
    private String creater;

    /**
     * 部门编号
     */
    private Integer createDept;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新人
     */
    private Integer updateId;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 租户编号
     */
    private Integer tenantId;

    /**
     * 租户名称
     */
    private String tenantName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SoftphoneCall other = (SoftphoneCall) that;
        return (this.getClId() == null ? other.getClId() == null : this.getClId().equals(other.getClId()))
            && (this.getClConnid() == null ? other.getClConnid() == null : this.getClConnid().equals(other.getClConnid()))
            && (this.getClParent() == null ? other.getClParent() == null : this.getClParent().equals(other.getClParent()))
            && (this.getClCallUuid() == null ? other.getClCallUuid() == null : this.getClCallUuid().equals(other.getClCallUuid()))
            && (this.getClAni() == null ? other.getClAni() == null : this.getClAni().equals(other.getClAni()))
            && (this.getClDni() == null ? other.getClDni() == null : this.getClDni().equals(other.getClDni()))
            && (this.getClChannel() == null ? other.getClChannel() == null : this.getClChannel().equals(other.getClChannel()))
            && (this.getClType() == null ? other.getClType() == null : this.getClType().equals(other.getClType()))
            && (this.getClAgentDn() == null ? other.getClAgentDn() == null : this.getClAgentDn().equals(other.getClAgentDn()))
            && (this.getClAnswered() == null ? other.getClAnswered() == null : this.getClAnswered().equals(other.getClAnswered()))
            && (this.getClHangup() == null ? other.getClHangup() == null : this.getClHangup().equals(other.getClHangup()))
            && (this.getClRingTime() == null ? other.getClRingTime() == null : this.getClRingTime().equals(other.getClRingTime()))
            && (this.getClRingTimeEnd() == null ? other.getClRingTimeEnd() == null : this.getClRingTimeEnd().equals(other.getClRingTimeEnd()))
            && (this.getClDialTime() == null ? other.getClDialTime() == null : this.getClDialTime().equals(other.getClDialTime()))
            && (this.getClDialTimeEnd() == null ? other.getClDialTimeEnd() == null : this.getClDialTimeEnd().equals(other.getClDialTimeEnd()))
            && (this.getClAnswerTime() == null ? other.getClAnswerTime() == null : this.getClAnswerTime().equals(other.getClAnswerTime()))
            && (this.getClIdleTime() == null ? other.getClIdleTime() == null : this.getClIdleTime().equals(other.getClIdleTime()))
            && (this.getClTalkTime() == null ? other.getClTalkTime() == null : this.getClTalkTime().equals(other.getClTalkTime()))
            && (this.getClWaitTime() == null ? other.getClWaitTime() == null : this.getClWaitTime().equals(other.getClWaitTime()))
            && (this.getClUserData() == null ? other.getClUserData() == null : this.getClUserData().equals(other.getClUserData()))
            && (this.getCreateId() == null ? other.getCreateId() == null : this.getCreateId().equals(other.getCreateId()))
            && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater()))
            && (this.getCreateDept() == null ? other.getCreateDept() == null : this.getCreateDept().equals(other.getCreateDept()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateId() == null ? other.getUpdateId() == null : this.getUpdateId().equals(other.getUpdateId()))
            && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()))
            && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClId() == null) ? 0 : getClId().hashCode());
        result = prime * result + ((getClConnid() == null) ? 0 : getClConnid().hashCode());
        result = prime * result + ((getClParent() == null) ? 0 : getClParent().hashCode());
        result = prime * result + ((getClCallUuid() == null) ? 0 : getClCallUuid().hashCode());
        result = prime * result + ((getClAni() == null) ? 0 : getClAni().hashCode());
        result = prime * result + ((getClDni() == null) ? 0 : getClDni().hashCode());
        result = prime * result + ((getClChannel() == null) ? 0 : getClChannel().hashCode());
        result = prime * result + ((getClType() == null) ? 0 : getClType().hashCode());
        result = prime * result + ((getClAgentDn() == null) ? 0 : getClAgentDn().hashCode());
        result = prime * result + ((getClAnswered() == null) ? 0 : getClAnswered().hashCode());
        result = prime * result + ((getClHangup() == null) ? 0 : getClHangup().hashCode());
        result = prime * result + ((getClRingTime() == null) ? 0 : getClRingTime().hashCode());
        result = prime * result + ((getClRingTimeEnd() == null) ? 0 : getClRingTimeEnd().hashCode());
        result = prime * result + ((getClDialTime() == null) ? 0 : getClDialTime().hashCode());
        result = prime * result + ((getClDialTimeEnd() == null) ? 0 : getClDialTimeEnd().hashCode());
        result = prime * result + ((getClAnswerTime() == null) ? 0 : getClAnswerTime().hashCode());
        result = prime * result + ((getClIdleTime() == null) ? 0 : getClIdleTime().hashCode());
        result = prime * result + ((getClTalkTime() == null) ? 0 : getClTalkTime().hashCode());
        result = prime * result + ((getClWaitTime() == null) ? 0 : getClWaitTime().hashCode());
        result = prime * result + ((getClUserData() == null) ? 0 : getClUserData().hashCode());
        result = prime * result + ((getCreateId() == null) ? 0 : getCreateId().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getCreateDept() == null) ? 0 : getCreateDept().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateId() == null) ? 0 : getUpdateId().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
        result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", clId=").append(clId);
        sb.append(", clConnid=").append(clConnid);
        sb.append(", clParent=").append(clParent);
        sb.append(", clCallUuid=").append(clCallUuid);
        sb.append(", clAni=").append(clAni);
        sb.append(", clDni=").append(clDni);
        sb.append(", clChannel=").append(clChannel);
        sb.append(", clType=").append(clType);
        sb.append(", clAgentDn=").append(clAgentDn);
        sb.append(", clAnswered=").append(clAnswered);
        sb.append(", clHangup=").append(clHangup);
        sb.append(", clRingTime=").append(clRingTime);
        sb.append(", clRingTimeEnd=").append(clRingTimeEnd);
        sb.append(", clDialTime=").append(clDialTime);
        sb.append(", clDialTimeEnd=").append(clDialTimeEnd);
        sb.append(", clAnswerTime=").append(clAnswerTime);
        sb.append(", clIdleTime=").append(clIdleTime);
        sb.append(", clTalkTime=").append(clTalkTime);
        sb.append(", clWaitTime=").append(clWaitTime);
        sb.append(", clUserData=").append(clUserData);
        sb.append(", createId=").append(createId);
        sb.append(", creater=").append(creater);
        sb.append(", createDeptId=").append(createDept);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateId=").append(updateId);
        sb.append(", updater=").append(updater);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", tenantId=").append(tenantId);
        sb.append(", tenantName=").append(tenantName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}